<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use DB;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class IndexController extends Controller
{	
	/**
	 * 网站首页
	 */
     public function index(){
     	$res = $this->carousel();
     	// dd($res);
     	//显示模板

     	$did = DB::table('gonggao')->get();
     	$dif = DB::table('link')->get();

    	return view('welcome',['aaa'=>$did,'lianjie'=>$dif,'res'=>$res]);

    	
    }
    public function carousel(){
    	 // return DB::table('carousel')->orderby('id','desc')->limit(5)->get();
    	 return DB::table('carousel')->get();

    }
}
